package cn.getech.data.development.mapper;

import cn.getech.data.development.entity.ProcInfo;
import cn.getech.data.development.entity.WorkMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 作业流菜单树 Mapper 接口
 * </p>
 *
 * @author hujz
 * @since 2020-04-13
 */
@Mapper
public interface WorkMenuMapper extends BaseMapper<WorkMenu> {

    IPage<WorkMenu> selectListPage(Page<WorkMenu> page, @Param("params") Map<String, Object> params,@Param("projectList") List<Integer> projectList);

    IPage<WorkMenu> listAndTime(Page<WorkMenu> page, @Param("params") Map<String, Object> params);

    List<Long> listUserIds(@Param("procLists") Set<Integer> procLists);

    void insertById(@Param("workMenu")WorkMenu workMenu);

    List<WorkMenu> listBy(Map<String,Object> params);

    List<ProcInfo> procs(@Param("userId")Long userId,@Param("tenantId")Integer tenantId);


}
